package com.demo2do.fms.admin.utils;

import org.apache.commons.lang3.time.DateUtils;

/**
 *
 * @author Ark
 *
 */
public abstract class DateParseUtils {
    
    /**
     * The default constructor
     */
    private DateParseUtils() {
    }
    
    /**
     * @param date
     * @param pattern
     * @return
     */
    public static boolean validDate(String date, String pattern) {
        
        try {
            DateUtils.parseDate(date, pattern);
            return true;
        } catch (Exception e) {
            return false;
        }
        
    }
    
}
